'use strict';
const db = uniCloud.database();
const dbCmd = db.command ;
const $ = db.command.aggregate ;
const cate = db.collection("news-navbar");

module.exports = {
		
	list : async function(res){
		var dataInDB = await cate.field({
			"name" : 1 ,
			"icon":1,
			"url":1,
			"sort":1,
			"parent_id":1,
			"isshow":1
		}).orderBy("sort","asc").get() ;
		var list = this.find( dataInDB );
		
		return {list};
	},
}